﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="Nokia_Smartphones.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="Profile_ID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Profile_ID" HeaderText="Profile_ID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="Profile_ID" />
                <asp:BoundField DataField="First_Name" HeaderText="First_Name" 
                    SortExpression="First_Name" />
                <asp:BoundField DataField="Mobile_Interest" HeaderText="Mobile_Interest" 
                    SortExpression="Mobile_Interest" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="Gender" HeaderText="Gender" 
                    SortExpression="Gender" />
                <asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
                <asp:BoundField DataField="Last_Name" HeaderText="Last_Name" 
                    SortExpression="Last_Name" />
                <asp:BoundField DataField="User_Name" HeaderText="User_Name" 
                    SortExpression="User_Name" />
                <asp:HyperLinkField DataNavigateUrlFields="Facebook" 
                    DataNavigateUrlFormatString="http://www.facebook.com/{0}" 
                    DataTextField="Facebook" HeaderText="Facebook" />
                <asp:ImageField DataImageUrlField="Picture" DataImageUrlFormatString="{0}">
                    <ControlStyle Height="100px" Width="100px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PhonesConn %>" 
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" 
            SelectCommand="SELECT [Profile_ID], [First_Name], [Mobile_Interest], [Picture], [Description], [Gender], [DOB], [Last_Name], [User_Name], [Facebook] FROM [Profile] WHERE ([User_Name] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="User_Name" QueryStringField="User_Name" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
    </p>
    <p>
        <asp:Button ID="btn_Edit" runat="server" PostBackUrl="~/EditProfile.aspx" 
            Text="Edit Profile" />
    </p>
    <p>
    </p>
</asp:Content>
